//
//  UIColor+Category.m
//  Teleport
//
//  Created by RLY on 2020/5/14.
//  Copyright © 2020 xxt. All rights reserved.
//

#import "UIColor+Category.h"

@implementation UIColor (Category)

+ (UIColor *)tj_blackColor {
    return UIColor.blackColor;
}

+ (nonnull UIColor *)tj_selectCellBackgroundColor {
    return UIColor_Hex(0xf4f4f4);
}

+ (nonnull UIColor *)tj_backgroundColor {
    return UIColor_Hex(0xF1F1F2);
}

+ (nonnull UIColor *)tj_mainColor {
    return UIColor_Hex(0x2B6CC7);
}

+ (nonnull UIColor *)tj_separatorColor {
    return UIColor_Hex(0xE5E5E5);
}

+ (nonnull UIColor *)tj_alertMaskColor {
    return [[UIColor blackColor] colorWithAlphaComponent:0.45];
}

+ (nonnull NSArray <UIColor *> *)tj_maskGradientColors {
    return @[[[UIColor blackColor] colorWithAlphaComponent:0.3], [[UIColor blackColor] colorWithAlphaComponent:0]];
}

+ (nonnull UIColor *)tj_presentMaskColor {
    return [[UIColor blackColor] colorWithAlphaComponent:0.35];
}

+ (nonnull CGColorRef)tj_borderColor {
    return UIColor_Hex(0xdadada).CGColor;
}

+ (nonnull UIColor *)tj_randomColor {
    u_int8_t red = arc4random_uniform(256);
    u_int8_t green = arc4random_uniform(256);
    u_int8_t blue = arc4random_uniform(256);
    
    return [UIColor tj_colorWithRed:red green:green blue:blue];
}

+ (nonnull UIColor *)tj_colorWithRed:(u_int8_t)red green:(u_int8_t)green blue:(u_int8_t)blue {
    return [UIColor colorWithRed:red / 255.0 green:green / 255.0 blue:blue / 255.0 alpha:1.0];
}


@end
